import comm from "comm";
cc.Class({
    extends: comm,

    properties: {
        target:cc.Node,
    },

    setInfo(target){
        this.target = target;
    },


    btnsAction(e,f){
        if(G_wuxingfenghuolu.gameObj.coin<100){
            this.gameHit("金币不足");
            return;
        }
        //创建塔
        var node = cc.instantiate(cc.globalRes["prefab_fangyuta"]);
        node.position = this.target.position;
        node.parent = this.node.parent;
        node.getComponent("fangyuta").setInfo(f);
        this.closeMe();
    },

    closeMe(){
        this.node.destroy();
    },


});
